package com.hclc.yxb.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hclc.entity.dvo.AdministratorDvo;
import com.hclc.yxb.ao.AddAdministratorAo;
import com.hclc.yxb.ao.ModAdministratorAo;
import com.hclc.yxb.dto.AdministratorDto;
import com.hclc.yxb.dto.AuthorityRoleDto;

import java.util.List;

/**
 * @ClassName PwlAdministratorManagementService
 * @Author: yurj
 * @Mail：1638234804@qq.com
 * @Date: Create in 20:10 2020/8/22
 * @version: 1.0
 */
public interface AdministratorManagementService {

    /**
     * 查询管理员列表
     *
     * @param page
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.hclc.pwl.dto.AdministratorDvo>
     * @author yurj
     * @mail 1638234804@qq.com
     * @version 1.0
     * @date 2020/8/22 21:09
     */
    IPage<AdministratorDto> selectAdministrator(Page<AdministratorDvo> page);

    /**
     * 查询权限角色列表
     *
     * @param
     * @return java.util.List<com.hclc.pwl.dto.AuthorityRoleDto>
     * @author yurj
     * @mail 1638234804@qq.com
     * @version 1.0
     * @date 2020/8/22 21:52
     */
    List<AuthorityRoleDto> selectAuthorityRole();

    /**
     * 添加管理员
     *
     * @param ao
     * @return boolean
     * @author yurj
     * @mail 1638234804@qq.com
     * @version 1.0
     * @date 2020/8/22 20:12
     */
    boolean insertAdministrator(AddAdministratorAo ao);

    /**
     * 删除管理员
     *
     * @param userId
     * @return boolean
     * @author yurj
     * @mail 1638234804@qq.com
     * @version 1.0
     * @date 2020/8/22 20:29
     */
    boolean deleteAdministrator(String userId);

    /**
     * 修改管理员
     *
     * @param ao
     * @return boolean
     * @author yurj
     * @mail 1638234804@qq.com
     * @version 1.0
     * @date 2020/8/22 20:37
     */
    boolean updateAdministrator(ModAdministratorAo ao);

    /**
     * 管理员修改自身登录密码
     *
     * @param password
     * @return boolean
     * @author yurj
     * @version 1.0
     * @date 2020/11/16 16:48
     */
    boolean updateCurrentAdministratorPass(String password);
}
